/**
 * @Date 2025/1/7 9:23
 * @Created by 衡盛永
 */

package org.example.deploy.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_menu")
public class SysMenu {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String name;
    private String url;

    @TableField(exist = false)
    private List<SysMenu> children = new ArrayList<>(); // 子菜单列表

    @TableField("parent_id")
    private Integer parentId;

    @TableField("sort_order")
    private Integer sortOrder;
    private String icon;

    // Getter and Setter
}
